﻿using System;
using System.Collections.Generic;
using System.Text;
using BaseData;

namespace TaxEntity.User
{
    /// <summary>
    /// 用户信息实体类
    /// </summary>
    [Serializable]
    public class UserEntity
    {
        public UserEntity()
        {
            this.AddTime = DateTime.Now;
        }

        #region Model
        private long userId;
        private string userName;
        private string pwd;
        private string sName;
        private int? userType;
        private int departmentID;
        private string eMail;
        private DateTime? lastLoginTime;
        private string userRights;
        private long? optUserID;
        private int? status = 1;
        private DateTime? addTime = DateTime.Now;
        /// <summary>
        /// 用户编号
        /// </summary>
        public long UserId
        {
            set { userId = value; }
            get { return userId; }
        }
        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName
        {
            set { userName = value; }
            get { return userName; }
        }
        /// <summary>
        /// 用户密码
        /// </summary>
        public string Pwd
        {
            set { pwd = value; }
            get { return pwd; }
        }
        /// <summary>
        /// 真实姓名
        /// </summary>
        public string SName
        {
            set { sName = value; }
            get { return sName; }
        }
        /// <summary>
        /// 用户类别（岗位角色）
        /// </summary>
        public int? UserType
        {
            set { userType = value; }
            get { return userType; }
        }
        /// <summary>
        /// 所属部门编号
        /// </summary>
        public int DepartmentID
        {
            set { departmentID = value; }
            get { return departmentID; }
        }
        /// <summary>
        /// 邮箱
        /// </summary>
        public string EMail
        {
            set { eMail = value; }
            get { return eMail; }
        }
        /// <summary>
        /// 最近登录时间
        /// </summary>
        public DateTime? LastLoginTime
        {
            set { lastLoginTime = value; }
            get { return lastLoginTime; }
        }
        /// <summary>
        /// 用户权限（暂时未用）
        /// </summary>
        public string UserRights
        {
            set { userRights = value; }
            get { return userRights; }
        }
        /// <summary>
        /// 操作人员
        /// </summary>
        public long? OptUserID
        {
            set { optUserID = value; }
            get { return optUserID; }
        }
        /// <summary>
        /// 数据状态（1正常 0删除）
        /// </summary>
        public int? Status
        {
            set { status = value; }
            get { return status; }
        }
        /// <summary>
        /// 添加日期
        /// </summary>
        public DateTime? AddTime
        {
            set { addTime = value; }
            get { return addTime; }
        }
        /// <summary>
        /// 用户类型
        /// </summary>
        public UserType UserEType
        {
            get
            {
                return (UserType)Enum.Parse(typeof(UserType), userType.ToString());
            }
        }
        #endregion Model

    }
}